package com.reggie.common.enums.backend;

import com.reggie.common.ResultResponseVo;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author 早睡蛋
 * @Date 2022/9/17 14:36:19
 * @Desc:
 */
@Getter
@AllArgsConstructor
public enum EmployeeEnum {
    SUCCESS(200,"ok"),
    FAIL(400,"fail"),

    LOGIN_OK(200,"登录成功"),
    LOGIN_FAIL(400,"账号密码错误"),

    EM_LOCKED(400,"用户已被禁用"),

    LOGOUT_OK(200,"已注销"),

    NO_LOGIN(4000,"未登录，请先登录！"),

    USERNAME_EXIST(400,"用户名已存在"),

    PHONE_EXIST(400,"手机号已存在"),

    IdNUMBER_EXIST(400,"身份证号码已存在"),

    SAVE_OK(200,"添加员工成功"),
    SAVE_FAIL(400,"添加员工失败"),

    STATUS_CHANGE_OK(200,"员工状态修改成功"),
    STATUS_CHANGE_FAIL(400,"员工状态修改失败"),

    UPDATE_OK(200,"编辑员工成功"),
    UPDATE_FAIL(400,"编辑员工失败"),



    ;


    EmployeeEnum(int code, String message) {
        this.resultResponseVo =  ResultResponseVo.defaultResultResponse();
        resultResponseVo.setCode(code);
        resultResponseVo.setMessage(message);
    }

    public int getCode(){
        return resultResponseVo.getCode();
    }

    public String getMessage(){
        return resultResponseVo.getMessage();
    }

    public ResultResponseVo getResult() {
        return resultResponseVo;
    }


    private final ResultResponseVo resultResponseVo;
}
